#ifndef BINGWALLPAPERSERVICE_H
#define BINGWALLPAPERSERVICE_H
#include <QObject>
#include <QString>
#include "HttpClient.h"
#include "WallpaperModel.h"
#include <Qurl>
#include <QDebug>
#include <JsonHelper.h>
#include <Qlist>

class BingWallpaperService : public QObject
{
public:
    BingWallpaperService();
    ~BingWallpaperService();

    QList<WallpaperModel *> GetWallpaper();
    void GetWallpaperAsync();
private:
    /**
     * @brief %1 壁纸index %2 数量
     */
    QString url;
    HttpClient *httpClient;

signals:
    void GetWallpaperFinished(QList<WallpaperModel *>) const;

private slots:
    void OnGetWallpaperFinished(QString str);
};

#endif // BINGWALLPAPERSERVICE_H
